package nl.ypmits.utils.as3.view.simpledraw {
	import flash.display.Shape;
	import flash.display.Sprite;

	/**
	 * @author Dave Lenz
	 */
	public class Cross extends Sprite {

		
		/**
		 * This draws a Plus-sign from it's center (or from any other part of the StageAlign.*)
		 */
		public function Cross( size : int = 13, linethickness : Number = 4, color : uint = 0xFF9900, align : String = "CENTER" ) {
			var holder : Shape = new Shape();
			addChild( holder );
			
			holder.graphics.clear();
			holder.graphics.beginFill(color);
			holder.graphics.drawRect( (size * .5)-(linethickness * .5), 0, linethickness, size );
			holder.graphics.endFill();
			holder.graphics.beginFill(color);
			holder.graphics.drawRect(0, (size * .5 )-(linethickness * .5), size, linethickness );
			holder.graphics.endFill();
			holder.width = size;
			holder.height = size;
			
			SimpleDrawAUtil.align( holder, align );
		}
	}
}
